package cn.iocoder.yudao.module.erp.dal.mysql.business.order.orderdelivery;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.erp.controller.admin.business.order.orderdelivery.vo.OrderDeliveryPageReqVO;
import cn.iocoder.yudao.module.erp.dal.dataobject.business.order.orderdelivery.OrderDeliveryDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 交货方式 Mapper
 *
 * @author yy
 */
@Mapper
public interface OrderDeliveryMapper extends BaseMapperX<OrderDeliveryDO> {

    default PageResult<OrderDeliveryDO> selectPage(OrderDeliveryPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<OrderDeliveryDO>()
                .likeIfPresent(OrderDeliveryDO::getName, reqVO.getName())
                .betweenIfPresent(OrderDeliveryDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(OrderDeliveryDO::getId));
    }

}